<template>
  <router-view v-if="isRouterAlive"></router-view>
</template>
<script setup>
import { getCurrentInstance, ref, provide } from 'vue'

const { proxy } = getCurrentInstance()
const isRouterAlive = ref(true)
// 重载画面
const reload = () => {
  isRouterAlive.value = false
  proxy.$nextTick(() => {
    isRouterAlive.value = true
  })
}

// 提供reload方法
provide('reload', reload)
</script>

<style lang="less" scoped>
</style>
